<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>事件绑定</title>
    <script src="angularjs/angular.min.js"></script>
</head>
<body ng-app="doraApp">
    <div ng-controller="demo03Ctrl">
        <input ng-model="txt" type="text"/>
        <button ng-click="doraClick()">Click</button>
    </div>

    <script>
        angular.module("doraApp",[])
                .controller("demo03Ctrl",function($scope){
                    $scope.txt = "forjs.org";
                    $scope.doraClick = function(){
                        alert($scope.txt);
                    }
                })
    </script>
</body>
</html>